package com.youjia.controller;

import com.youjia.pojo.Rights;
import com.youjia.service.RightsService;
import com.youjia.vo.SysResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/rights")
public class RightsController {
    @Autowired
    private RightsService rightsService;
    @GetMapping("/getRightsList/{userId}")
    public SysResult getRightsList(@PathVariable Integer userId) {
        List<Rights> rightsList = rightsService.getRightsList(userId);
        return SysResult.success(rightsList);
    }
}
